﻿#pragma once
//<<<<include
//#define WIN32_LEAN_AND_MEAN             // 从 Windows 头文件中排除极少使用的内容
// Windows 头文件
#include <windows.h>
#pragma comment(lib,"ws2_32.lib")
#pragma comment(lib,"Crypt32.lib")
#include <chrono>

#include "app/staticRouter.h"
#include "inja/inja.hpp"

#include "add/jwt/jwtbase.h"

#include "oatpp/web/server/HttpConnectionHandler.hpp"
#include "oatpp/network/Server.hpp"
#include "oatpp/core/macro/codegen.hpp"
#include "oatpp/network/tcp/server/ConnectionProvider.hpp"
#include "oatpp/web/protocol/http/outgoing/BufferBody.hpp"
#include "oatpp/web/server/api/ApiController.hpp"
#include "oatpp/web/server/HttpRequestHandler.hpp"

#include <winsock.h>

//include>>>>
//<<<<const

#define PROJECTNAME "weboat"
#define PROJECTVVERSION "1.3"
#define WEB_OCTET_STREAM "octet-stream"

//const>>>>
//<<<<define
namespace WoApp = oatpp;

std::shared_ptr<oatpp::web::protocol::http::outgoing::Response>
GlobalHandlerError(const std::shared_ptr<oatpp::web::protocol::http::incoming::Request>& req,
	const std::shared_ptr<oatpp::web::protocol::http::HttpError>& err);

//#include "redisconnect/RedisConnect.h"
#include "haper/haper.h"
#include "log/logger.h"
#include "orm/sqlite3/orm_sqlite3.h"
#include "ref/ref.h"

//define>>>>
//<<<<define var

inline std::string g_host;
inline int g_port;
inline WoLoggetPtr g_logger;
inline WoHTTPHanderErrorFunc g_handerError;


//define var>>>>